#ifndef __MMAP_UTILS__HH__
#define __MMAP_UTILS__HH__

#include <string>
using namespace std;

#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>

struct MMap
{
  string fn;
  char* orig_mmap_addr;
  char* mmap_metadata;
  void* mmap_addr;
  size_t mmap_size;

  MMap();
  bool open_mmap(const char* fn, bool writable, size_t create_mmap_size);
  void close_mmap();
};

#endif
